<?php namespace Summer\Hjd\Updates;

use Schema;
use Winter\Storm\Database\Updates\Migration;

class BuilderTableCreateSummerHjdMessage extends Migration
{
    public function up()
    {
        Schema::create('summer_hjd_message', function($table)
        {
            $table->engine = 'InnoDB';
            $table->increments('id')->unsigned();
            $table->timestamp('created_at')->nullable();
            $table->timestamp('updated_at')->nullable();
            $table->string('title')->nullable();
            $table->text('content')->nullable();
            $table->text('reply')->nullable();
            $table->integer('from_uid')->nullable();
            $table->integer('to_uid')->nullable();
            $table->integer('is_read')->nullable();
            $table->integer('is_reply')->nullable();
            $table->integer('status')->nullable();
            $table->dateTime('replied_at')->nullable();
        });
    }
    
    public function down()
    {
        Schema::dropIfExists('summer_hjd_message');
    }
}
